package holy;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import top.cjwtx.holy.dao.SacredtokenPassWordDao;
import top.cjwtx.holy.dao.SacredtokenPwdDao;
import top.cjwtx.holy.dao.UserDtoDao;
import top.cjwtx.holy.phone.AppApplication;
import top.cjwtx.holy.pojo.dto.PwdCkDTO;
import top.cjwtx.holy.pojo.dto.SacredtokenPwdDTO;
import top.cjwtx.holy.pojo.dto.UserDTO;
import top.cjwtx.holy.pojo.po.SacredtokenPassword;
import top.cjwtx.holy.service.IPwdService;

import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = AppApplication.class)
public class test {

    @Autowired
    private UserDtoDao userDtoDao;

    @Autowired
    private IPwdService pwdService;

    @Autowired
    private SacredtokenPassWordDao sacredtokenPassWordDao;

    @Autowired
    private SacredtokenPwdDao sacredtokenPwdDao;

    @Test
    public void test(){
        UserDTO userDTOByUserNameAndType = userDtoDao.findUserDTOByUserNameAndType("123", 1);
        System.out.println(userDTOByUserNameAndType);
    }

    @Test
    public void test2(){
        List<PwdCkDTO> pwdCkDTOS = pwdService.listPwdCkByUserId(1L);
        System.out.println(pwdCkDTOS);
    }



    @Test
    public void SacredtokenPwdDao(){
        List<SacredtokenPwdDTO> sacredtokenPwdDTOS = sacredtokenPwdDao.listPwdByCkId(1L);
        System.out.println(sacredtokenPwdDTOS);
    }

    @Test
    public void test3(){
        SacredtokenPassword pwdById = sacredtokenPassWordDao.getPwdById(123L);
        System.out.println(pwdById);
    }

}
